package com.modifiertech.lineage.client.gui.ftbint;

import com.feed_the_beast.ftblib.lib.gui.Panel;
import com.feed_the_beast.ftblib.lib.gui.TextField;
import com.feed_the_beast.ftblib.lib.gui.Theme;
import com.feed_the_beast.ftblib.lib.icon.Color4I;

public class PanelSkillRegion extends Panel {
    private TextField levelTextDesc;
    private int regionSize=1;
    private int currentRegionFromLevel=0;
    private int currentRegionToLevel=5;
    private GuiLineageV2 mainGui;
    private int pos_x=0;
    private int pos_y=0;

    public int getPos_x() {
        return pos_x;
    }

    public void setPos_x(int pos_x) {
        this.pos_x = pos_x;
    }

    public int getPos_y() {
        return pos_y;
    }

    public void setPos_y(int pos_y) {
        this.pos_y = pos_y;
    }

    public PanelSkillRegion(Panel panel, int from, int to, int regionSize, GuiLineageV2 mainGui) {
        super(panel);
        this.regionSize=regionSize;
        this.currentRegionFromLevel=from;
        this.currentRegionToLevel=to;
        this.mainGui=mainGui;
        init();
    }

    private void init() {
        initRegionDesc();
    }

    private void initRegionDesc() {
        levelTextDesc=new TextField(this);
        levelTextDesc.setPos(3,parent.height/2);
        levelTextDesc.setScale(1.15f);
        levelTextDesc.setColor(Color4I.GRAY.addBrightness(30));
    }

    @Override
    public void addWidgets() {
        add(levelTextDesc);
    }

    @Override
    public void alignWidgets() {
        levelTextDesc.setSize(10,10);
        levelTextDesc.setPos(3,3);
        levelTextDesc.setText(currentRegionFromLevel+"~"+currentRegionToLevel);
    }

    @Override
    public void drawBackground(Theme theme, int x, int y, int w, int h) {
        Color4I.BLACK.withAlpha(50).withBorder(Color4I.WHITE,true).draw(x, y, w, h);
    }

    public TextField getLevelTextDesc() {
        return levelTextDesc;
    }

    public void setLevelTextDesc(TextField levelTextDesc) {
        this.levelTextDesc = levelTextDesc;
    }

    public int getRegionSize() {
        return regionSize;
    }

    public void setRegionSize(int regionSize) {
        this.regionSize = regionSize;
    }

    public int getCurrentRegionFromLevel() {
        return currentRegionFromLevel;
    }

    public void setCurrentRegionFromLevel(int currentRegionFromLevel) {
        this.currentRegionFromLevel = currentRegionFromLevel;
    }

    public int getCurrentRegionToLevel() {
        return currentRegionToLevel;
    }

    public void setCurrentRegionToLevel(int currentRegionToLevel) {
        this.currentRegionToLevel = currentRegionToLevel;
    }
}
